import { baseApiUrl, path } from "../../utils/config";
import { userInfo } from '../../utils/api';
const app = getApp();
Page({
  data: {
    baseImageUrl: baseApiUrl,
    head_img: "",
    nickname: "",
    vip_price: ""
  },
  async onLoad(options) {
    let res = await userInfo();
    let { vip_price } = res;
    let { head_img, nickname } = res.user;
    this.setData({ head_img, nickname, vip_price });
  },
  onShareAppMessage() {
    let poster = app.globalData.poster;
    return {
      path,
      imageUrl: poster
    }
  },
  onShareTimeline() { }
})